/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package homework6;

/**
 *
 * @author Administrator
 */
import java.util.*;
public class MainF{
    public static void main(String []args){
        Scanner reader = new Scanner(System.in);
        String str1,str2;
        while(reader.hasNext()){
            str1 = reader.next();
            str2 = reader.next();
            if(str1.indexOf(str2)==-1)
                System.out.println("NO");
            else
                System.out.println("YES");
        }
    }
}
